import 'package:flutter/material.dart';

class MyApp4 extends StatelessWidget {
  const MyApp4({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home:Scaffold(
        appBar: AppBar(
          title: const Text('text组件'),
          backgroundColor: Colors.black26,
          centerTitle: true,
        ),
        body: const Center(
          child: Text(
          '这是文字部分',
          textAlign: TextAlign.center,
          style: TextStyle(
            color: Colors.amberAccent,
            backgroundColor: Colors.blueAccent,
            fontSize: 44,
            fontWeight: FontWeight.bold,
            fontStyle: FontStyle.italic
          ),
        ),
        )
      )
    );
  }
}